Repository navigation
Conversation
### What problem does this PR solve? Issue Number: N/A Problem Summary: FE and BE runtime images default to root, and operator entrypoints modify configuration projected from read-only ConfigMaps. Create a configurable doris UID/GID (10001 by default), assign runtime files and directories to that user, and switch the runtime images to it. Copy writable FE/BE configuration before startup updates it. Route the default Kerberos configuration link through the writable Doris conf directory, including when the entrypoint runs repeatedly. ### Release note FE and BE images run as UID/GID 10001 by default. Kubernetes deployments can supply fsGroup and disable the Operator's system init and cgroup setup. No host cgroup delegation is provisioned. Host kernel tuning and volume-driver support remain platform constraints. ### Check List (For Author) - Test: ShellCheck and bash syntax; projected-config tests for four entrypoints; Kerberos config and repeated-start tests as the image's non-root user; Docker builds; existing Operator 26.0.1 on K3s 1.34.12 with fresh PVCs, no init containers, UID 10001 and all capabilities dropped; SQL, Stream Load, WG queue timeout, fixed-slot memory limit, CPU limit behavior, and persisted data after recreating both Pods. Runtime validation uses packaged Doris 4.1.4 binaries; the master engine was not rebuilt. - Behavior changed: Yes, default image user and writable configuration handling. - Does this need documentation: Yes, included in docker/runtime/README.md.
### Background Standalone FE and BE images already use a configurable non-root Doris user. Meta Service shares the runtime packaging workflow and loads configuration projected by the Kubernetes Operator before starting Meta Service and Recycler. ### What problem does this PR solve? Issue Number: None Related PR: None PR Type: Enhancement Problem Summary: Meta Service still defaults to root, and its startup configuration handling does not consistently prepare a writable configuration or preserve an existing FDB endpoint when the environment override is absent. Run MS and Recycler as the same default UID/GID as FE and BE, prepare writable configuration, and forward custom IDs through the shared image build helper. ### Details - Before and after: MS changes from root to UID/GID 10001. Image-owned runtime directories are writable; ConfigMap-backed primary configuration is copied and made writable before the FDB endpoint is applied. Repeated starts replace the endpoint instead of accumulating assignments. Role arguments are forwarded. - Configs and defaults: DORIS_UID and DORIS_GID default to 10001 for all component builds. An absent FDB_ENDPOINT preserves the configured endpoint. - Impact on existing users: Existing root-owned volumes require a separate permission migration. No migration or privileged helper is introduced. - Behavior change: MS and Recycler now run without root by default; startup preparation errors fail immediately and the entrypoint execs the start script. ### Testing - Bash syntax, targeted ShellCheck, and git diff --check pass. - Projected read-only configuration and repeated-start tests pass under UID 10001 with all capabilities dropped. Removing the writable-mode correction causes the MS test to fail with Permission denied. - Built standalone linux/amd64 FE, BE and MS images with official, SHA-512-verified Doris 4.1.4 packaged binaries. Verified image IDs after K3s containerd import. - Unmodified Operator 26.0.1 on native x86_64 K3s v1.34.13: DorisCluster and DorisDisaggregatedCluster both start in restricted namespaces with fresh local-path PVCs, no init containers, UID/GID 10001, zero effective capabilities, no privilege escalation and RuntimeDefault seccomp. - SQL insert, Stream Load and queries pass in both deployment modes. Recreated all Doris pods through CR annotations and verified unchanged PVC identities and all five expected rows after service recovery. MS and Recycler both start. - Observed duplicate backend-registration retries and transient DNS/gRPC query recovery after cloud backend replacement; eventual checks pass. These existing startup/reconnection paths are unchanged by this patch. ### Release note Meta Service and Recycler runtime images now use UID/GID 10001 by default, matching FE and BE. Configure writable volumes and matching Kubernetes security contexts; existing root-owned volumes need their permissions prepared separately. ### Check List (For Author) - Behavior changed: Yes (see Details). - Does this need documentation: Yes, included in docker/runtime/README.md. - Pre-submission status: Partially verified: native amd64 with packaged 4.1.4; arm64, the current master engine and existing-PVC migration were not tested. ### AI Disclosure - Tool: Codex. - Generated: Runtime changes, tests, documentation and this description. - Human review: Pending author review.
### Background The standalone runtime build uses verified Doris release archives for FE, BE, and Meta Service on Ubuntu and UBI 9. The entrypoints install projected configuration before they start Doris. ### What problem does this PR solve? Issue Number: None Related PR: apache#70821 (non-root runtime update), apache#70770 (shared runtime builder), apache#39093 (disaggregated entrypoint) PR Type: Bugfix Problem Summary: The shared builder forwards invalid runtime IDs before downloading the archive or starting the base build. Its previous default mirror returned HTTP 403 when requesting the 4.1.5 checksums. A projected FE config also discards the FQDN setting that disaggregated startup applies before installing the file. Validate the IDs early, use the Apache download mirror, and apply cloud settings to the installed config. ### Details - **Change map:** 200 production, 81 test, and 24 documentation lines changed. No generated files. Build changes validate IDs and select the download mirror. Entrypoint changes install the projected config before applying startup settings. - **Frequency:** Reproduced when building with UID 0 or starting disaggregated FE with a projected fe.conf that omits enable_fqdn_mode. The legacy mirror returned 403 in the verification environment. - **Root cause:** The builder forwards IDs without checking them, and the FE entrypoint applies FQDN settings to the image config before replacing it with the projected config. - **Why existing tests missed it:** Build tests checked valid identity forwarding and mock checksums. The entrypoint test exercised the copy helper outside the disaggregated FE startup sequence. Kernel regression tests start packaged services and do not exercise these runtime build scripts. - **Fix:** Validate decimal IDs before fetching artifacts and before creating Docker users. Point the builder at the current Apache download mirror. Install writable primary configs before applying cloud settings, preserve explicit FQDN mode, and replace generated cloud assignments on restart. - **Other paths and branches:** Both distro launchers use the shared builder. Integrated FE and BE share the projected file handling, and disaggregated BE reapplies its cloud mode. Meta Service retains its existing FDB handling. The shared builder is outside branch-4.0 and branch-4.1 at the inspected refs. Their FE entrypoints retain the old ordering. This change targets master. - **Behavior change:** Invalid build-time IDs fail earlier, and disaggregated FE defaults to FQDN mode when its effective config omits the setting. ### Testing - Confirmed red and green results for invalid IDs, the download URL, and disaggregated FE with a read-only projected config. - Passed the runtime build unit tests, targeted ShellCheck, and Bash syntax checks. - Built 24 Docker fixture images for Ubuntu and UBI 9 on amd64 and arm64. Checked default and custom IDs for FE, BE, and MS, then ran the non-root configuration tests on both distributions and architectures. - Retrieved the official 4.1.5 checksums for the comparison inputs and verified the current operator tool source pin. ### Release note Validate non-root runtime IDs before image builds, use the current Apache release download mirror, and preserve the FQDN default and cloud configuration across projected-config startup and restart. ### Check List (For Author) - Behavior changed: Yes (see Details). - Does this need documentation: Yes. The runtime README documents the IDs, startup behavior, and matching standalone Operator CLI. - Pre-submission status: Partially verified: full Doris binary image builds and Kubernetes upgrade tests are tracked in the release verification stage. ### AI Disclosure - Tool: Codex (GPT-6). - Generated: Implementation, tests, and draft. - Human review: Pending maintainer review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
The standalone Doris runtime images package FE, BE, and Meta Service/Recycler for container deployments on Ubuntu and UBI 9. The entrypoints install mounted configuration before running the engine.
What problem does this PR solve?
Issue Number: None
Related PR: #70770 (shared Ubuntu and UBI runtime build)
PR Type: Enhancement
Problem Summary:
The standalone images require root without these changes. Run the three components under a dedicated numeric identity and prepare their writable configuration at startup. The shared build validates custom identity values before fetching an archive and uses the mirror published on the Apache Doris download page.
Details
Testing
Earlier author validation with 4.1.4 binaries
Release note
Standalone FE, BE, and Meta Service/Recycler runtime images use a dedicated non-root user. Prepare storage ownership before upgrading mounted data and use the matching standalone Operator CLI for deployment Preflight. Keep the already published 4.1.5 image digests as the upgrade baseline and use separate tags for the non-root images.
Check List (For Author)
AI Disclosure